﻿using System;
using System.Collections.Generic;
using System.Text;

namespace FlashPay.Service.Interface
{
    using FlashPay.Entity;
    using FlashPay.Entity.Parameter;
    using FlashPay.Entity.Request.Payment;
    using FlashPay.Entity.Response.Payment;
    using FlashPay.Entity.Response.Sys;

    public interface PaymentRecordService
    {
        /// <summary>
        /// 根据编号获取余额变化记录
        /// </summary>
        /// <param name="orderNo">编号</param>
        /// <returns>Company</returns>
        RecordRealResponse Get(long orderNo);


        /// <summary>
        /// 获取第三方支付类型
        /// </summary>
        /// <returns></returns>
        JResult<List<SysConfigResponse>> GetSysConfigList();

        /// <summary>
        /// 订单验证
        /// </summary>
        /// <param name="companyId">公司编号</param>
        /// <param name="orderNo">付款卡订单号</param>
        JResult VerificationOrder(int companyId, long orderNo);

        /// <summary>
        /// 付款记录取消
        /// </summary>
        /// <param name="orderNo">编号</param>
        /// <returns>JResult</returns>
        JResult PaymentRecordCancel(long orderNo, string userName);

        /// <summary>
        /// 付款记录重置
        /// </summary>
        /// <param name="orderNo">编号</param>
        /// <returns>JResult</returns>
        JResult PaymentRecordReset(long orderNo, string userName);

        /// <summary>
        /// 付款确认
        /// </summary>
        /// <param name="request">参数</param>
        JResult PaymentConfirm(PaymentConfirmRequest request);

        /// <summary>
        /// 重新付款
        /// </summary>
        /// <param name="request"></param>
        JResult RenewPayment(RenewPaymentRequest request);

        /// <summary>
        /// 添加付款记录
        /// </summary>
        /// <param name="request">参数</param>
        /// <returns></returns>
        JResult PaymentRecordAdd(PaymentRecordAddRequest request);

        /// <summary>
        /// 获取付款卡信息
        /// </summary>
        /// <returns></returns>
        PaymentCardResponse GetPaymentCard(PaymentCardRequest request);

        /// <summary>
        /// 付款卡查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        DataGrid<PaymentCardResponse> GetPaymentCardPager(PaymentCardQuery query);

        /// <summary>
        /// 付款卡查询
        /// </summary>
        /// <param name="query">查询参数</param>
        PagedList<PaymentCardResponse> GetRenewMatchCardPager(RenewMatchCardQuery query);

        /// <summary>
        /// 付款记录查询
        /// </summary>
        /// <param name="query"></param>
        DataGrid<PaymentRecordResponse> GetPaymentRecordPager(PaymentRecordQuery query);

        /// <summary>
        /// 收付款记录查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        DataGrid<PaymentRecordResponse> GetPaymentRecordExport(PaymentRecordQuery query);

        /// <summary>
        /// 补单
        /// </summary>
        /// <param name="request"></param>
        JResult ReceiptMakeUp(ReceiptMakeUpRequest request);

        /// <summary>
        /// 重新配卡
        /// </summary>
        /// <returns></returns>
        JResult RenewMatchCard(RenewMatchCardReqeust reqeust);

        /// <summary>
        /// 验证订单号是否属于当前用户公司
        /// </summary>
        /// <param name="companyId"></param>
        /// <param name="orderNo"></param>
        bool CheckOrder(int companyId, long orderNo);

        /// <summary>
        /// 银行卡余额异常查询
        /// </summary>
        /// <param name="request"></param>
        JResult<AdjustBalanceResponse> GetPaymentcardException(PaymentcardExceptionRequest request);

        /// <summary>
        /// 改变渠道
        /// </summary>
        /// <param name="request"></param>
        JResult ChangeChannels(ChangeChannelsRequest request);

        /// <summary>
        /// 改变公司
        /// </summary>
        /// <param name="request"></param>
        JResult ChangeCompany(ChangeCompanyRequest request);

    }
}
